import cv2
import numpy as np
if __name__ == '__main__':
    image=cv2.imread('C:\\Users\\20436\Desktop\\rotation_image.jpg')
    x_min,x_max=257,572
    y_min,y_max=554,774
    ROI_image = image.copy()[y_min:y_max, x_min:x_max]

    angle = 0
    scale = 1

    M = cv2.getRotationMatrix2D(
        (0, 0),
        angle,
        scale
    )
    rotation_image = cv2.warpAffine(
        ROI_image,
        M,
        (ROI_image.shape[1]*4, ROI_image.shape[0]*4),
        flags=cv2.INTER_NEAREST,
        borderMode=cv2.BORDER_WRAP
    )
    cv2.imshow('rotation_image',rotation_image)
    cv2.imwrite('rotation_image.jpg',rotation_image)
    cv2.waitKey(0)


